package Year22_Month07.day07;

public class 反转链表 {
    public ListNode reverseList(ListNode head) {
        ListNode slow = head;
        ListNode fast = head;
        ListNode tmp = null;
        while(fast != null){
            slow.next = tmp;
            tmp = slow;
            slow = fast;
            fast = fast.next;
        }
        return slow;
    }
}
